package manong.serviceimpl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import manong.beans.lesson;
import manong.beans.manager;
import manong.mapper.lessonMapper;
import manong.service.lessonService;
@Service @Transactional
public class lessonImpl implements lessonService{

	@Resource
	lessonMapper lessonmapper;
	public manager login(String username, String password) {
		return lessonmapper.login(username,password);
	}
	public int add_lesson(lesson lesson) {
		
		return lessonmapper.add_lesson(lesson);
	}

	public void update_lesson(lesson lesson) {
		
		 lessonmapper.update_lesson(lesson);;
	}

	public int delete_lesson(int cno) {
		
		return lessonmapper.delete_lesson(cno);
	}


	public List<lesson> getAll_lesson() {
		
		return lessonmapper.getAll_lesson();
	}

	public lesson get_lesson(int cno) {
		
		return lessonmapper.get_lesson(cno);
	}
	@Override
	public manager get_manager(String username) {
		// TODO Auto-generated method stub
		return lessonmapper.get_manager(username);
	}

}
